<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:fragment="head">
    <meta charset="UTF-8">
    <title>事务所后台管理系统</title>
    <link href="/layui/css/layui.css" rel="stylesheet" type="text/css"/>
    <link href="/layui/css/admin.css" rel="stylesheet" type="text/css"/>
    <link href="/layui/css/layui.css" rel="stylesheet" type="text/css"/>
    <script src="/layui/jquery.min.js"></script>
    <script src="/layui/layui.js"></script>
    <script src="/layui/axios.min.js"></script>
    <script src="/layui/vue.min.js"></script>
    <style>
        .layui-layout-admin .layui-side {
            top: 48px;
            width: 200px;
            overflow-x: hidden;
        }
        .layui-side-scroll {
            position: relative;
            width: 200px;
            height: 100%;
            overflow-x: hidden;
        }
    </style>
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
    <div class="layui-header">
        <div class="layui-logo">事务所后台管理系统</div>
        <!-- 头部区域（可配合layui已有的水平导航） -->
        <ul class="layui-nav layui-layout-right">
            <!--<li class="layui-nav-item">
                <a href="javascript:;">
                    <img src="http://t.cn/RCzsdCq" class="layui-nav-img">
                </a>
                <dl class="layui-nav-child">
                    <dd><a href="/html/user/editPassword.html" target="index">基本资料</a></dd>
                </dl>
            </li>-->
            <li class="layui-nav-item"><a href="/front/logout">退出登陆</a></li>
        </ul>
    </div>

    <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
            <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
            <ul class="layui-nav layui-nav-tree"  lay-filter="test" id="menu">
                <li class="layui-nav-item layui-nav-itemed" v-for="(menu,index) in menus">
                    <a class="" href="javascript:;">{{menu.menuName}}</a>
                    <dl class="layui-nav-child">
                        <dd v-for="(c,cindex) in menu.children"><a :href="c.menuUrl" target="index">{{c.menuName}}</a></dd>
                    </dl>
                </li>
            </ul>
        </div>
    </div>

    <div class="layui-body">
        <!-- 内容主体区域 -->
        <div style="padding: 5px;">
            <iframe class="layadmin-iframe" name="index" src="/html/main.html" frameborder="0" ></iframe>
        </div>
    </div>

    <div class="layui-footer">

        <!-- 底部固定区域 -->
        © Law.firm.com - 事务所后台管理系统
    </div>
</div>
<script>
    //JavaScript代码区域
    layui.use('element', function(){
        var element = layui.element;

        var data = new Vue({
            el:'#menu',
            data:{
                menus:[]
            },
            created(){
                axios.get("/menu/getByUserId/1").then(res => {
                    this.menus = res.data.data;
                })
            },
            updated(){
                element.render('nav','test');
            }
        })
    });



</script>
</body>
</html>
